package com.sy.mapper;

import com.sy.bean.pucharse.PurchaseDetail;
import com.sy.bean.pucharse.ShipmentDetail;
import com.sy.common.crud.IMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
@Mapper
public interface ShipmentDetailMapper extends IMapper<ShipmentDetail> {
    /**
     * 根据出货单id查询对应出货单明细
     * @param id 付款单id
     * @return
     */
    List<Map> queryDetailByShipmentId(int id);


    /**
     * 批量保存采购信息
     * @param pid 采购单id
     * @return 行数
     */
    int batchSave(@Param("pid") int pid, @Param("shipmentDetailList") List<ShipmentDetail> shipmentDetailList);

    /**
     * 根据采购单id删除购物明细
     * @param id 采购单id
     * @return 成败
     */
    int deleteByShipmentId(int id);

}